import request from '@/utils/request'
// import store from '@/store'

// 封装一个做登录的接口
export function loginAPI (data) {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data
  })
}
// 获取用户信息的接口
export const userInfoAPI = () => {
  return request({
    url: '/v1_0/user/profile'
  })
}
// 封装一个修改用户头像的接口
export const editPhotoAPI = (data) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data
  })
}
// 封装一个修改资料的接口
export const editUserInfoAPI = (data) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data
  })
}
